Set Default Card
Cards
Set Default Card
Set a card as the default payment method for a customer
POST
Set Default Card
Sets a specific card as the default payment source for a customer. This card will be used for automatic payments unless otherwise specified.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/peLuis123/Stripe_Back/llms.txt
Use this file to discover all available pages before exploring further.
Request Body
The Stripe customer ID. Must start with
cus_.Example: "cus_QRs9eKZ4xUzN2TP9"The card ID to set as default. Must start with
card_ or src_.This must be a card that’s already attached to the customer. Use Assign Card first if needed.Example: "card_1QRs9eKZ4xUzN2TPabcdefgh"Response
Indicates if the request was successful (
true) or failed (false).Human-readable message describing the result.Example:
"Método de pago actualizado con éxito"The updated Stripe customer object. This is the raw customer object from Stripe containing all customer information.
Example Request
Example Response
Use Cases
Setting Default After Card Assignment
After assigning a new card to a customer, you may want to set it as the default:Node.js
Switching Default Cards
If a customer has multiple cards and wants to switch the default:Node.js
The default payment source will be automatically used for subscription charges and invoice payments when no specific payment method is provided.